clear all

*********************************************
****   Description   ************************
*********************************************

*This program analyzes the change in advertising volumes after the 1870 charter amendment, generating "Table 3. Increase in Advertising Volumes after the 1870 Charter Amendment - Analysis across Banks." 


 

global cluster bank_id mo_date

*********************************************
****   IA Table - Poisson  ****************** 
*********************************************
use  "$Data/Bank_Advertising_Panel_December2024.dta", clear 


egen city_month = group(bank_city mo_date)

	
* Bank level
 eststo clear
       	xi: ppmlhdfe count_ads FSB [pw= black_pop_1870] , absorb(mo_date bank_city )    vce(cluster $cluster)
         eststo
		xi: ppmlhdfe count_ads FSB post_FSB [pw= black_pop_1870],  absorb(mo_date bank_city )   vce(cluster  $cluster)
		eststo
	    xi: ppmlhdfe count_ads post_FSB [pw= black_pop_1870],  absorb(bank_id  mo_date  )   vce(cluster  $cluster)
		eststo
	    xi: ppmlhdfe count_ads post_FSB [pw= black_pop_1870],  absorb(bank_id    city_month)   vce(cluster  $cluster)
		eststo
 		xi: ppmlhdfe count_ads post_FSB  [pw= black_pop_1870],  absorb(mo_date bank_id##c.year)   vce(cluster  $cluster)
eststo
		
 esttab , keep(FSB post_FSB  )  ///
b(%10.2f) se(%10.2f) order(FSB post_FSB ) ///
starlevels(* .10 ** .05 *** .01) nolegend ///
nonumbers ///
nonotes mlabels(none) /// 
stats(N r2 r2_p, fmt(%9.0fc %9.2fc %9.2f) label("Observations" "$ R^{2} $" "$P-R^{2} $" ))
 
 
 
* Newspaper level
 use "$Data/Newspaper_Advertising_Panel_December2024.dta", clear
global cluster  mo_date

gen post_FSB_AA=post_FSB & post_AA
egen np_month = group(Newspaper mo_date)


	xi: ppmlhdfe count_ads post_FSB  [pw= black_pop_1870],  absorb(FSB  Newspaper mo_date)  vce(cluster  $cluster )
		eststo
		xi: ppmlhdfe count_ads post_FSB  [pw= black_pop_1870],  absorb(FSB  np_month)  vce(cluster  $cluster )
		eststo
		xi: ppmlhdfe count_ads post_FSB_AA post_FSB  [pw= black_pop_1870],  absorb(FSB  Newspaper mo_date)  vce(cluster $cluster )
        eststo
		xi: ppmlhdfe count_ads post_FSB_AA post_FSB  [pw= black_pop_1870],  absorb(FSB np_month  )  vce(cluster $cluster )
        eststo

esttab , keep(FSB post_FSB   post_FSB_AA)  ///
b(%10.2f) se(%10.2f) order(FSB post_FSB   post_FSB_DC) ///
starlevels(* .10 ** .05 *** .01) nolegend ///
nonumbers ///
nonotes mlabels(none) /// 
stats(N r2 r2_p, fmt(%9.0fc %9.2fc %9.2f) label("Observations" "$ R^{2} $" "$P-R^{2} $" ))

 
